
package se.sll.service.catalogue.offers.api.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.codehaus.jackson.annotate.JsonAnyGetter;
import org.codehaus.jackson.annotate.JsonAnySetter;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;


/**
 * A unit model for managing offers
 * 
 */
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
    "unitId",
    "regionalUnitId",
    "relativeDistinguishedName",
    "creationTime",
    "updateTime",
    "sourceSystemHsaId",
    "contracts",
    "productReferences",
    "properties"
})
public class OfferUnitList {

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("unitId")
    @NotNull
    private String unitId;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("regionalUnitId")
    @NotNull
    private String regionalUnitId;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("relativeDistinguishedName")
    @NotNull
    private String relativeDistinguishedName;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("creationTime")
    @NotNull
    private Date creationTime;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("updateTime")
    @NotNull
    private Date updateTime;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("sourceSystemHsaId")
    @NotNull
    private String sourceSystemHsaId;
    /**
     * a collection of Contracts
     * 
     */
    @JsonProperty("contracts")
    @Valid
    private List<Contract> contracts = new ArrayList<Contract>();
    /**
     * a collection of product references
     * 
     */
    @JsonProperty("productReferences")
    @Valid
    private List<ProductReference> productReferences = new ArrayList<ProductReference>();
    /**
     * a collection of generic CV Types
     * 
     */
    @JsonProperty("properties")
    @Valid
    private List<Type> properties = new ArrayList<Type>();
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    /**
     * 
     * (Required)
     * 
     * @return
     *     The unitId
     */
    @JsonProperty("unitId")
    public String getUnitId() {
        return unitId;
    }

    /**
     * 
     * (Required)
     * 
     * @param unitId
     *     The unitId
     */
    @JsonProperty("unitId")
    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public OfferUnitList withUnitId(String unitId) {
        this.unitId = unitId;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The regionalUnitId
     */
    @JsonProperty("regionalUnitId")
    public String getRegionalUnitId() {
        return regionalUnitId;
    }

    /**
     * 
     * (Required)
     * 
     * @param regionalUnitId
     *     The regionalUnitId
     */
    @JsonProperty("regionalUnitId")
    public void setRegionalUnitId(String regionalUnitId) {
        this.regionalUnitId = regionalUnitId;
    }

    public OfferUnitList withRegionalUnitId(String regionalUnitId) {
        this.regionalUnitId = regionalUnitId;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The relativeDistinguishedName
     */
    @JsonProperty("relativeDistinguishedName")
    public String getRelativeDistinguishedName() {
        return relativeDistinguishedName;
    }

    /**
     * 
     * (Required)
     * 
     * @param relativeDistinguishedName
     *     The relativeDistinguishedName
     */
    @JsonProperty("relativeDistinguishedName")
    public void setRelativeDistinguishedName(String relativeDistinguishedName) {
        this.relativeDistinguishedName = relativeDistinguishedName;
    }

    public OfferUnitList withRelativeDistinguishedName(String relativeDistinguishedName) {
        this.relativeDistinguishedName = relativeDistinguishedName;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The creationTime
     */
    @JsonProperty("creationTime")
    public Date getCreationTime() {
        return creationTime;
    }

    /**
     * 
     * (Required)
     * 
     * @param creationTime
     *     The creationTime
     */
    @JsonProperty("creationTime")
    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public OfferUnitList withCreationTime(Date creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The updateTime
     */
    @JsonProperty("updateTime")
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     * (Required)
     * 
     * @param updateTime
     *     The updateTime
     */
    @JsonProperty("updateTime")
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public OfferUnitList withUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The sourceSystemHsaId
     */
    @JsonProperty("sourceSystemHsaId")
    public String getSourceSystemHsaId() {
        return sourceSystemHsaId;
    }

    /**
     * 
     * (Required)
     * 
     * @param sourceSystemHsaId
     *     The sourceSystemHsaId
     */
    @JsonProperty("sourceSystemHsaId")
    public void setSourceSystemHsaId(String sourceSystemHsaId) {
        this.sourceSystemHsaId = sourceSystemHsaId;
    }

    public OfferUnitList withSourceSystemHsaId(String sourceSystemHsaId) {
        this.sourceSystemHsaId = sourceSystemHsaId;
        return this;
    }

    /**
     * a collection of Contracts
     * 
     * @return
     *     The contracts
     */
    @JsonProperty("contracts")
    public List<Contract> getContracts() {
        return contracts;
    }

    /**
     * a collection of Contracts
     * 
     * @param contracts
     *     The contracts
     */
    @JsonProperty("contracts")
    public void setContracts(List<Contract> contracts) {
        this.contracts = contracts;
    }

    public OfferUnitList withContracts(List<Contract> contracts) {
        this.contracts = contracts;
        return this;
    }

    /**
     * a collection of product references
     * 
     * @return
     *     The productReferences
     */
    @JsonProperty("productReferences")
    public List<ProductReference> getProductReferences() {
        return productReferences;
    }

    /**
     * a collection of product references
     * 
     * @param productReferences
     *     The productReferences
     */
    @JsonProperty("productReferences")
    public void setProductReferences(List<ProductReference> productReferences) {
        this.productReferences = productReferences;
    }

    public OfferUnitList withProductReferences(List<ProductReference> productReferences) {
        this.productReferences = productReferences;
        return this;
    }

    /**
     * a collection of generic CV Types
     * 
     * @return
     *     The properties
     */
    @JsonProperty("properties")
    public List<Type> getProperties() {
        return properties;
    }

    /**
     * a collection of generic CV Types
     * 
     * @param properties
     *     The properties
     */
    @JsonProperty("properties")
    public void setProperties(List<Type> properties) {
        this.properties = properties;
    }

    public OfferUnitList withProperties(List<Type> properties) {
        this.properties = properties;
        return this;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public OfferUnitList withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

}
